import request from '@/utils/request'

const before = '/pc/cashRecord/';

// 查询佣金变更记录列表
export function listRecord(query) {
  return request({
    url: before + 'pageList',
    method: 'get',
    params: query
  })
}

// 查询佣金变更记录详细
export function getRecord(id) {
  return request({
    url: before + 'info/' + id,
    method: 'get',
    params: {id}
  })
}

// 新增佣金变更记录
export function addRecord(data) {
  return request({
    url: before + 'addOrUpdate',
    method: 'post',
    data: data
  })
}

// 新增佣金变更记录
export function updateRecord(data) {
  return request({
    url: before + 'addOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除佣金变更记录
export function delRecord(id) {
  return request({
    url: before + 'delete/' + id,
    method: 'delete'
  })
}
